import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import App from './App.vue'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

import 'highlight.js/styles/github-dark.css'
import 'element-plus/dist/index.css'
import "./styles/global.css";
import "virtual:windi.css";
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import VueQrcode from '@chenfengyuan/vue-qrcode'

import router from './router'

const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
app.use(pinia).component(VueQrcode.name, VueQrcode).use(ElementPlus,{locale: zhCn,}).use(router).mount('#app')